#include "Rato.h"

Rato* Rato::_instance=NULL;


Rato* Rato::instance(){
	if(Rato::_instance==NULL){
		Rato::_instance= new Rato();
	}
	return Rato::_instance;
}


int Rato::getX(){
	int x;
	SDL_GetMouseState(&x, NULL);
	return x;
}
int Rato::getY(){
	int y;
	SDL_GetMouseState(NULL, &y);
	return y;
}

bool Rato::pressedRight(){
	return (bool)(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(3));
}
bool Rato::pressedLeft(){
	return (bool)(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1));
}
bool Rato::pressedMid(){
	return (bool)(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(2));
}
